<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <router-view/>
    </div>
  </a-config-provider>
</template>

<script>
import { domTitle, setDocumentTitle } from '@/utils/domUtil'
// import { i18nRender } from '@/locales'
  import { getRoLeList, getUserList } from '@/api/system'
export default {
  data () {
    return {
    }
  },
  computed: {
    locale () {
      // 只是为了切换语言时，更新标题
      const { title } = this.$route.meta
      title && (setDocumentTitle(`${domTitle}`))

      return this.$i18n.getLocaleMessage(this.$store.getters.lang).antLocale
    }
  },
  created() {
    // this.getYWYID()
  },
  methods:{
    // getYWYID() {
    //   getRoLeList().then(res=>{
    //     const list = res.data.data
    //     const ywy_role_id = list.filter(item=>item.name == '业务员')[0].id
    //     localStorage.setItem('ywy_role_id',ywy_role_id)
    //     console.log("ywy_role_id",ywy_role_id)
    //     const gys_role_id = list.filter(item=>item.name == '供应商')[0].id
    //     localStorage.setItem('gys_role_id',gys_role_id)
    //     console.log("gys_role_id",gys_role_id)
    //   })
    // }
  }
}
</script>
<style>
  #app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100%;
    box-sizing: border-box;
    letter-spacing: 1px;
  }
  body{
    font-family: Avenir, Helvetica, Arial, sans-serif !important;
  }
  /* 文字溢出隐藏并显示省略号 */
  .textfont{
    width: 200px;
    height: 40px;
    /* height: 100%; */
  	overflow: hidden;
  	text-overflow: ellipsis;
  	display: -webkit-box;
  	-webkit-line-clamp:2; /* 设置行数 */
  	-webkit-box-orient:vertical;
  }
  .searchBoxDiv{
    display: inline-block;
  }
  .red{color: #FF6666;}
  .width100{width:100px;}
  .width160{width:160px;}
  .width200{width:200px;}
  .width240{width:240px;}
  .width300{width:300px;}
  .margL6{
    margin-left: 6px;
  }
  .margL10{
    margin-left: 10px;
  }
  .margL20{
    margin-left: 20px;
  }
  .margT4{
    margin-top: 4px;
  }
  .margT6{
    margin-top: 6px;
  }
  .margT10{
    margin-top: 10px;
  }
  .margT20{
    margin-top: 20px;
  }
  .modelBottonBtnBox{
    text-align: right;
  }
  //其他样式
  p{
    margin-bottom: 0 !important;
    span{
      img{
        width: 100% !important;
      }
    }
    img{
      width: 100% !important;
    }
  }
</style>
